package com.didispace.chapter12;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 示例模块
 **/
@RestController
public class HelloController {

    @Value("${name:}")
    private String name;

    @RequestMapping("/")
    public String index() {
        return name;
    }

    /**
     * 分页获取文档列表
     *
     * @param docQuery
     * @return
     */
    @PostMapping("/pageListDocs")
    public List<Document> pageListDocs(@RequestBody DocQuery docQuery) {
        return new ArrayList<>();
    }

}
